package com.wuage.interfaces.account.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Pattern;

/**
 * @author Shynin
 * @version 1.0
 * @date 9/28/21 11:32 AM
 */
@Data
@ApiModel("管理员新增对象")
public class RegisterAdminDO {

    @Pattern(regexp = "^((13[0-9])|(14[0,1,4-9])|(15[0-3,5-9])|(16[2,5,6,7])|(17[0-8])|(18[0-9])|(19[0-3,5-9]))\\d{8}$", message = "请输入正确手机号")
    @ApiModelProperty(value = "账号", required = true)
    private String username;

    @Length(min = 2, max = 64, message = "昵称长度是2-64位之间")
    @ApiModelProperty(value = "昵称", required = true)
    private String nickname;

    @ApiModelProperty(value = "密码", required = true)
    @Length(min = 6, max = 16, message = "密码必须在6到16位之间")
    private String password;

    @ApiModelProperty(value = "租户名", required = true)
    @Length(min = 2, max = 64, message = "租户名字长度是2-64位之间")
    private String tenantName;
}
